import { createApp } from 'vue'
import App from './App.vue'
// import './assets/main.css'
// 配置vue-router
import router from './router/index.js'
//引入element-plus
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'
//引入echarts
import * as echarts from 'echarts' 
//引入axios
import axios from 'axios'
//引入element-plus图标库
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app=createApp(App)
// 给 axios 设置请求根路径
axios.defaults.baseURL = 'http://localhost:8081/project-declaration-system'
// 挂载echarts
app.config.globalProperties.$echarts = echarts
// 全局挂载 axios
app.config.globalProperties.$axios = axios
//导入图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
app.use(router).use(ElementPlus).mount('#app')
